package org.wyn.mongodb.bean;

import java.util.Random;

/**
 * 评论
 * @author wyn
 *
 */
public class Comment {
	private String authorUserName;
	private String authorRealName;
	private String content;
	private long addTime;//评论发表时间
	public Comment(){
		
	}
	public Comment(String userName,String realName,String content){
		authorUserName = userName;
		authorRealName = realName;
		this.content = content;
		addTime = System.currentTimeMillis();
	}
	public String getAuthorUserName() {
		return authorUserName;
	}
	public void setAuthorUserName(String authorUserName) {
		this.authorUserName = authorUserName;
	}
	public String getAuthorRealName() {
		return authorRealName;
	}
	public void setAuthorRealName(String authorRealName) {
		this.authorRealName = authorRealName;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public long getAddTime() {
		return addTime;
	}
	public void setAddTime(long addTime) {
		this.addTime = addTime;
	}
	
	
	public static Comment buildComment(String authorUsername,String authorRealName,long addTime){
		Comment c = new Comment();
		c.authorUserName = authorUsername;
		c.authorRealName = authorRealName;
		c.addTime = addTime;
		int i = new Random().nextInt()%5;
		switch (i) {
		case 0:
			c.content = "很好很强大";
			break;
		case 1:
			c.content = "顶楼主";
			break;
		case 2:
			c.content = "楼主傻逼不解释";
			break;
		case 3:
			c.content = "不管你懂没懂反正我是没懂";
			break;
		case 4:
			c.content = "请叫我大哥";
			break;
		case 5:
			c.content = "楼主你又调皮了";
			break;
		case 6:
			c.content = "友情怒顶！";
			break;
		default:
			c.content = "我什么也不说";
			break;
		}
		return c;
	}
	
}
